package com.soft.collateral.controller;


import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.soft.collateral.entity.Assess;
import com.soft.collateral.result.Result;
import com.soft.collateral.service.AssessService;
import com.soft.collateral.vo.PageQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 评估报告表 前端控制器
 * </p>
 *
 * @author liubin
 * @since 2025-07-25
 */
@RestController
@RequestMapping("/admin/assess")
@Slf4j
@Api(tags = "后台系统-评估报告接口")
@RequiredArgsConstructor
public class AssessController {

    private final AssessService assessService;

    @ApiOperation("条件分页查询评估报告列表")
    @GetMapping("page")
    public Result page(PageQueryVO pageQueryVO) {
        Page<Assess> page = assessService.findPage(pageQueryVO);
        return null;
    }

    @ApiOperation("新增评估报告")
    @PostMapping
    public Result save(@RequestBody Assess assess) {
        boolean flag = assessService.save(assess);
        return null;
    }

    @ApiOperation("通过ID查询评估报告信息")
    @GetMapping("{id}")
    public Result findById(@PathVariable Long id) {
        Assess assess = assessService.getById(id);
        return null;
    }


    @ApiOperation("删除评估报告")
    @DeleteMapping("{id}")
    public Result deleteById(@PathVariable Long id) {
        boolean flag = assessService.removeById(id);
        return null;
    }
}
